<?php get_header();?>
<div id="content">
<div id="mcontent">
<?php if( have_posts() ): while( have_posts() ): the_post();?>
<div class="entry">
<div class="entry-title">
<h2><a href="<?php the_permalink();?>" rel="bookmark" title="<?php the_title();?>"><?php the_title();?></a></h2></div>
<div class="entry-content">
<?php the_excerpt();?>
</div>
<div class="entry-etc"><span class="entry-link"><?php echo substr(get_permalink(),7);?></span><span class="entry-date">&nbsp;-&nbsp;<?php echo time_since(get_the_time('U'));?>&nbsp;-&nbsp;</span><span class="entry-info"><?php the_category(',');?>&nbsp;-&nbsp;<?php comments_popup_link('暂无评论', '1条评论', '%条评论' ); ?>
</div>
</div>
<div class="clear"></div>
<div class="page_navi">
<?php pagenavi(9); ?>
</div>
<?php endwhile; else:?>
<div class="entry">
<div class="entry-title"><h2>囧，没搜到</h1></div>
<div class="entry-content">
<p>请放心，江哥倒下了还有谷歌，稍等下在下面的搜索框执行搜索就可以了。</p>
<div id="cse" style="width: 100%;">Loading</div>
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
  google.load('search', '1', {language : 'zh-CN'});
  google.setOnLoadCallback(function() {
    var customSearchControl = new google.search.CustomSearchControl('009074447596699951990:e_y5ugq6p-o');
    customSearchControl.setResultSetSize(google.search.Search.LARGE_RESULTSET);
    customSearchControl.draw('cse');
  }, true);
</script>
<link rel="stylesheet" href="http://www.google.com/cse/style/look/default.css" type="text/css" /> 
</div>
</div>
<?php endif;?>
</div>
<div id="lcontent">
<?php get_template_part('sidebar_l','index');?>
</div>
<div id="rcontent">
<?php get_template_part('sidebar_r','index');?>
</div>
</div>
<?php get_footer();?>